# import datetime
#
# now = datetime.datetime.now()
#
# ten_seconds_later = datetime.datetime.now() + datetime.timedelta(seconds=30)
#
# print(ten_seconds_later)
# import os
#
# from moviepy.video.io.ImageSequenceClip import ImageSequenceClip
#
# from L_API import settings
#
#
# def appium_video(menu_id, result_id, device):
#     # 指定视频输出路径
#     output_video = os.path.join(settings.MEDIA_ROOT, "output.mp4")
#
#     images = ["E:/lapi_project/L_API/media/2023/06/25/1687683684967_1687683758_BRNUT21B15053171.png",
#               "E:/lapi_project/L_API/media/2023/06/25/1687683684967_1687683759_BRNUT21B15053171.png",
#               "E:/lapi_project/L_API/media/2023/06/25/1687683684967_1687683763_BRNUT21B15053171.png",
#               "E:/lapi_project/L_API/media/2023/06/25/1687683684967_1687683765_BRNUT21B15053171.png",
#               "E:/lapi_project/L_API/media/2023/06/25/1687683684967_1687683777_BRNUT21B15053171.png",
#               "E:/lapi_project/L_API/media/2023/06/25/1687683684967_1687683779_BRNUT21B15053171.png",
#               "E:/lapi_project/L_API/media/2023/06/25/1687683684967_1687683783_BRNUT21B15053171.png",
#               "E:/lapi_project/L_API/media/2023/06/25/1687683684967_1687683785_BRNUT21B15053171.png",
#               "E:/lapi_project/L_API/media/2023/06/25/1687683684967_1687683792_BRNUT21B15053171.png",
#               "E:/lapi_project/L_API/media/2023/06/25/1687683684967_1687683799_BRNUT21B15053171.png",
#               "E:/lapi_project/L_API/media/2023/06/25/1687683684967_1687683806_BRNUT21B15053171.png",
#               "E:/lapi_project/L_API/media/2023/06/25/1687683684967_1687683813_BRNUT21B15053171.png"]
#     # 定义图像序列列表
#     img_sequence = []
#
#     # 遍历记录并将图片添加到图像序列列表中
#     for record in images:
#         img_path = record
#         img_sequence.append(img_path)
#
#     # 创建图像序列剪辑
#     clip = ImageSequenceClip(img_sequence, fps=30)
#
#     # 导出视频文件
#     clip.write_videofile(output_video, codec="libx264")
#     print("Video created at:", output_video)
#
# appium_video(4, "1687338471081", "6faf7764")